package com.feibiao.computer;

import java.util.Scanner;

public class Sub implements TwoOperandCompute {
    private double result;

    @Override
    public double compute() {
        double operand1,operand2;
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入被减数");
        operand1 = scanner.nextDouble();
        System.out.println("请输入减数");
        operand2 = scanner.nextDouble();
        result = operand1 - operand2;
        return result;
    }

}
